1
general::
Behave toward others as you would like to have them behave toward you, as in Of course I'll help him out; it's a case of do unto others, and I may be in the same boat one day. This so-called golden rule is stated in just about every ancient writing about behavioral precepts (including the New Testament, Talmud, Koran, and the Analects of Confucius). Among the earliest appearances in English is Earl Rivers' translation of a saying of Socrates (Dictes and Sayenges of the Philosophirs, 1477): "Do to other as thou wouldst they should do to thee, and do to none other but as thou wouldst be done to." It is so well known that it is often shortened.
American Heritage Idioms
2
general::
Phrase(s): Do unto others as you would have them do unto you. [and] Do as you would be done by.
Prov. You should treat other people the way you want them to treat you. (From Luke 6:31; it is also known as "The Golden Rule.") • Mother: Don’t call your playmates names. Child: Why not? Mother: Because you should follow the Golden Rule: Do unto others as you would have them do unto you. • It’s hard to be kind to people sometimes, but I try to remember to do as I’d be done by.
McGrawhill's American Idioms And Phrasal Verbs